package com.oa.dao;

import java.util.List;
import java.util.Map;




import org.springframework.stereotype.Repository;

import com.oa.bean.Bored;
import com.oa.bean.Leaves;
import com.oa.bean.Orders;
import com.oa.bean.Privilege;
import com.oa.bean.Reply;
import com.oa.bean.Role;
import com.oa.bean.RolePrivilege;
import com.oa.bean.Send;
import com.oa.bean.User;
import com.oa.bean.UserAndSection;

@Repository
public interface IndexDao {

	List<Map<String,Object>> selectTest();
	
	//请假申请自动获取部门
	public User queryByIdName(int id);
	//登陆
	public UserAndSection login(Map<String,Object> map);
	//审批人下拉框
	public List<UserAndSection> sectionList(int uid);
	//新增请假申请
	public int addLeaves(Leaves lea);
	//新增用章申请
	public int addOrdex(Orders order);
	//显示用章信息
	public List<Orders> showOrderList();
	//删除用章信息
	public int deleteOrder(int id);
	//根据用章id查询所有信息
	public Orders queryByIdOrder(int oid);
	//修改用章信息
	public int moifyOrders(Orders order);
	//显示所有帖子
	public List<Send> showSendPost();
	//版块下拉框显示
	public List<Send> showBored();
	//发表帖子
	public int addPost(Send send);
	//根据版块id查询版块名称
	public Bored queryByIdSend(int bid);
	//查询帖子信息
	public List<Send> querySend(Map<String,Object> map);
	//删除帖子  批量
	public int deletePost(int sid);
	//修改编辑帖子
	public int modifyPost(Send s);
	//查看帖子详细信息
	public List<Send> lookPost(int sid);
	//查找详细信息主贴
	public Send lookMainPost(int sid);
	//新增回帖
	public int addReplyPost(Reply r);
	//根据回帖id查找name
	public Reply queryByIdReply(int rid);
	//查找显示待审批的帖子
	public List<Send> queryWaitPost(Map<String,Object> map);
	//修改批准状态
	public int modifyApprove(int s);
	//显示我我发布的帖子
	public List<Send> ShowSendList(Map<String,Object> map);
	//显示论坛管理模块
	public List<Bored> showBoredPost();
	//删除版块
	public int deleteRored(int bid);
	//根据版块id查询版主
	public Send findByIdSend(int bid);
	//新增版块
	public int addBored(Bored b);
	//添加多条
	public int addBoreds(List<Bored> bored);
	
	public List<Bored> queryBroed();
	//查询所有的角色
		public List<Role> selectAllRoleList();
		//根据角色id查询姓名
		public Role selectRoleById(int parent);
		//回显权限
		public List<String> selectCheckedPrivilegeId(int roleId);
		//查找所有的权限
		public List<Privilege> selectPrivilegeTopList();
		//根据id查询权限
		public List<Privilege> selectPrivilegeById(int[] id);
		//新增权限
		public int ainsertPrivilegeIds(RolePrivilege rolep);
		//增加权限时把原来的清空
		public int deletePrvilege(int id);
		//查找所有权限
		public List<Privilege> findAllPrivilegeUrl();

}
